/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.poss.api.domain;

import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;

/**
 *
 * @author sampath
 */
@Entity
public class Function {
    private long functionId;
    private String functionDescription;
    private List<Role> functionRoles;

    public String getFunctionDescription() {
        return functionDescription;
    }

    public void setFunctionDescription(String functionDescription) {
        this.functionDescription = functionDescription;
    }

    @Id
    @GeneratedValue
    public long getFunctionId() {
        return functionId;
    }

    public void setFunctionId(long functionId) {
        this.functionId = functionId;
    }

    @ManyToMany(mappedBy="roleFunctions")
    public List<Role> getFunctionRoles() {
        return functionRoles;
    }

    public void setFunctionRoles(List<Role> functionRoles) {
        this.functionRoles = functionRoles;
    }
    
    
}
